package cn.hnvec.xiaohui02;

public class Example03 {
public static void main (String []arge){
	int[] arr={1,2,3,4,5,6,7};
	int max =getMax(arr);
	System.out.println("max="+max);
}
static int getMax(int[] arr){
	int max=arr[0];
	for (int x=1;x<arr.length;x++){
		if (arr[x] >max){
			max =arr[x];
		}
	}
	return max;
}
}
